#!/usr/bin/env python
#coding=utf-8

import os
import json

diskinfo = "/dev/shm/disk.info"

t       = os.popen("grep '^Slot Number' " + diskinfo  + " | awk -F ': ' '{print $2}'""")

disks = []
for disk in  t.readlines():
        r = os.path.basename(disk.strip())
        disks += [{'{#DISK}':r}]
print json.dumps({'data':disks},sort_keys=True,indent=4,separators=(',',':'))
